<style>
.bubble 
{
position: relative;
width: 100%;
height: 80px;
padding: 4px;
background: #FFFFFF;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
border: #000000 solid 2px;
overflow-y: scroll;
}

</style>
<form id="message-form" method="post" action="<?=site_url('message/process');?>">
	<div class="row">
		<div class="large-10 small-10 columns">
			<label class="label label-inverse">Message:</label>
			<textarea name="message_body" class="tiny-mce-init"></textarea>
		</div>

		<div class="large-2 small-2 columns">
			<hr>
			<input type="submit" id="send-message" name="reply_to_thread" value="Reply" class="btn btn-block btn-primary">
			<input type="hidden" name="thread_id" value="<?=$thread_id;?>">
			<input type="hidden" name="hash" value="<?=$hash;?>">
		</div>
	</div>
</form>
<div class="alert-box secondary">

<?if($thread):?>
	<?foreach($thread as $k => $v):?>
		<div class="row" style="padding:0;margin-bottom:10px;">
			<!-- <div class="large-2 small-2 columns">
				 <span class="label label-success">From</span><br>
				 <?php
					if($v->created_by == $this->session->userdata('loc_emp_id')){
						echo 'Me';
					}else{
						echo ucwords(strtolower($v->senders_name));
					}
				 ?>
				 <span style="font-size:10px;display:block;"><?=ucwords(strtolower($v->created_on));?></span>
			</div> -->
			<div class="large-12 small-12 columns">
				<p>
					 <span class="label label-success"><i class="fa fa-user"></i> From &nbsp; : &nbsp;
					  <?php
						if($v->created_by == $this->session->userdata('loc_emp_id')){
							echo 'Me';
						}else{
							echo ucwords(strtolower($v->senders_name));
						}?>
					 </span>
					 <span style="font-size:10px;display:block; float:right" class="badge important"><?=ucwords(strtolower($v->created_on));?></span>
				</p>
				<div class="bubble">
					<?=strip_tags(html_entity_decode($v->contents));?>
				</div>
			</div>
		</div>
	<?endforeach;?>
<?endif;?>
</div>